<template>
<ScalablePage>
  <!-- 配水井  psj -->
  <div class="left">
   
    <h2><img src="../assets/psj/gy.png" style="width: 100%;" /></h2>
    <div class="psj-p psj-txt">
      <p>
        配水井是水库输水管线与净配水厂的连接构筑物，它的主要作用是稳定净水构筑物流量负荷分配，提高净水效率。
      </p>
      <p>配水井设计规模为20.0万m3/d。设计堰前水位高程1170.0m。配水井配备主要设备如下:</p>
      <p>
        1、2台回转式格栅(格栅宽B=2m，栅间距5mm，N=2.2kW):2、1台无轴螺旋输送机 (
        L=9.35m，N=4kW )。
      </p>
      <p>配有视频监控摄像头1个，24小时监控，另外有专人定期巡回检查。</p>

      主要危险有害因素:触电、机械伤人、跌入池中溺水伤亡等。
    </div>
    <h1><img src="../assets/psj/jcsj.png" style="margin-top: 6px;width:100%" /></h1>
    <h2><img src="../assets/psj/psjt2.png" style="margin-top: 6px" /></h2>
    <div class="psj-con">
      <div class="pjs-item">
        <img src="../assets/psj/icon.png" alt="" />
        <div>
          <div class="psj-t">
            {{ psj.yewei }} <sub><span class="pjs-sub">m</span> </sub>
          </div>
          <p class="psj-p">格栅前后液位差</p>
        </div>
      </div>
      <div class="pjs-item">
        <img src="../assets/psj/icon.png" alt="" />
        <div>
          <div class="psj-t">{{ psj.zhuodu }} <span class="pjs-sub">NTU</span></div>
          <p class="psj-p">原水浊度</p>
        </div>
      </div>
      <div class="pjs-item">
        <img src="../assets/psj/icon.png" alt="" />
        <div>
          <div class="psj-t">{{ psj.ph }}</div>
          <p class="psj-p">原水PH值</p>
        </div>
      </div>
      <div class="pjs-item">
        <img src="../assets/psj/icon.png" alt="" />
        <div>
          <div class="psj-t">{{ psj.dan }} <span class="pjs-sub">mg/L</span></div>
          <p class="psj-p">原水总氮</p>
        </div>
      </div>
      <div class="pjs-item">
        <img src="../assets/psj/icon.png" alt="" />
        <div>
          <div class="psj-t">{{ psj.code }} <span class="pjs-sub">mg/L</span></div>
          <p class="psj-p">原水cod值</p>
        </div>
      </div>
    </div>
    <div class="pjs-item" style="margin-top: 20px">
      <div class="psj-pic"></div>
      <div class="psj-pic"></div>
    </div>
  </div>
</ScalablePage>
</template>
<script setup lang="ts">
import ScalablePage from "@/components/ScalablePage.vue"; 
import { ref, onMounted, reactive, toRefs } from "vue";
import { waterApi } from "@/utils/shuiwu/api";

const state = reactive({
  psj: {
    yewei: 0,
    zhuodu: 0,
    ph: 0,
    dan: 0,
    code: 0,
  },
});

let { psj } = toRefs(state);

onMounted(() => {
  getPsj(631);
});

function getPsj(id: number) {
  waterApi(id).then((res) => {
    let arr = res.rows as any;
    for (let i = 0; i < arr.length; i++) {
      if (arr[i].modelId == 4382) {
        state.psj.yewei = Number(arr[i].value);
      }
      if (arr[i].modelId == 4377) {
        state.psj.zhuodu = Number(arr[i].value);
      }
      if (arr[i].modelId == 4381) {
        state.psj.ph = Number(arr[i].value);
      }
      if (arr[i].modelId == 4380) {
        state.psj.dan = Number(arr[i].value);
      }
      if (arr[i].modelId == 4376) {
        state.psj.code = Number(arr[i].value);
      }
    }
  });
}
</script>
<style scoped></style>
